package com.example.liu_test.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.liu_test.vo.userVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface userVoMapper extends BaseMapper<userVo> {
    List<userVo> queryAll();

    @Select("SELECT user.*,dept.dept_name,address.add_num FROM user LEFT JOIN dept ON user.dept_id=dept.dept_id LEFT JOIN address ON dept.dept_name=address.dept_name WHERE user.dr=0")
    List<userVo> sqlQueryAll();



    String sql=  "SELECT user.*,dept.dept_name,address.add_num FROM user LEFT JOIN dept ON user.dept_id=dept.dept_id LEFT JOIN address ON dept.dept_name=address.dept_name WHERE user.dr=0";
}
